﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Features;

namespace Ebusiness_Application.Feature
{
    public class EbusinessFeatureDefine : FeatureDefinitionProvider
    {
        /// <summary>
        /// 特征定义
        /// </summary>
        /// <param name="context"></param>
        /// <exception cref="NotImplementedException"></exception>
        public override void Define(IFeatureDefinitionContext context)
        {
            //throw new NotImplementedException();
            //定义特征组
            FeatureGroupDefinition featureGroupDefinition = context.AddGroup("ProducrGroup");

            //定义特征
            featureGroupDefinition.AddFeature("AddProducrFeature", "true");

            FeatureDefinition featureDefinition = featureGroupDefinition.AddFeature("UpdateProducrFeature", "true");
            //添加子特征
            FeatureDefinition featureDefinition1 = featureDefinition.CreateChildFeature("SendSmsFeature", "true");
            featureDefinition.CreateChildFeature("SendEmaillFeature", "true");

            //添加3级（子特征）
            featureDefinition1.CreateChildFeature("TestChildFeature", "true");

            featureGroupDefinition.AddFeature("DeleteProducrFeature", "true");
        }
    }
}
